package test2;

import java.time.LocalDate;
import java.time.ZoneOffset;
import java.util.Calendar;
import java.util.stream.Stream;

/**
 * @author liule
 * @date 2023/4/3 14:51
 */
public class Test3_Java8新特性Stream {
    public static void main(String[] args) {
        Integer i1 = new Integer(1);
        Integer i2 = new Integer(1);
        Integer i3 = new Integer(1000);
        Integer i4 = new Integer(1000);

        boolean equals1 = i1.equals(Integer.parseInt("1"));
        boolean equals2 = i3.equals(Integer.parseInt("1000"));

        System.out.println("equals1:"+equals1);
        System.out.println("equals3:"+equals2);

//        Stream<Integer> integerStream = Stream.of(new Integer(1));
//        String s = new String("12");
//        s.toUpperCase();
        Long todayZeroTime = LocalDate.now()
                .atStartOfDay(ZoneOffset.ofHours(8))
                .toInstant()
                .toEpochMilli();
        System.out.println("todayZeroTime:"+todayZeroTime);
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        Long todayZeroTime2 = cal.getTimeInMillis();
        System.out.println("todayZeroTime:"+todayZeroTime);

    }
}
